From: Philip Withnall Date: Thu, 29 Jun 2017 23:43:31 +0000 (+0100) Subject: lib/repo: Fix repo-finder deleting remote configs when run X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~35^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=acace571efb0fe6410e6464e715d1f50f832a9a7;p=ostree.git lib/repo: Fix repo-finder deleting remote configs when run An inverted condition in _ostree_repo_add_remote() was causing the OstreeRepoFinder to delete precisely the wrong remote configurations from memory once it was finished. It’s supposed to delete the ones which it transiently added; but was instead deleting all the existing remote configurations. Signed-off-by: Philip Withnall Closes: #985 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 8f3a8bd0..a02214e1 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -181,7 +181,7 @@ _ostree_repo_add_remote (OstreeRepo *self, g_mutex_lock (&self->remotes_lock); - already_existed = g_hash_table_replace (self->remotes, remote->name, ostree_remote_ref (remote)); + already_existed = !g_hash_table_replace (self->remotes, remote->name, ostree_remote_ref (remote)); g_mutex_unlock (&self->remotes_lock);